//
//  MANNavigationController.m
//  Three
//
//  Created by 夜猫子 on 2017/3/22.
//  Copyright © 2017年 夜猫子. All rights reserved.
//

#import "MANNavigationController.h"
#import "CZAdditions.h"

@interface MANNavigationController ()

@end

@implementation MANNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self setupUI];
}


/**
 页面搭建
 */
- (void)setupUI {
    //设置不透明
    self.navigationBar.translucent = NO;

    //去掉导航条分割线
    [self.navigationBar setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
     self.navigationBar.shadowImage = [[UIImage alloc]init];
    
    self.navigationBar.barTintColor = [UIColor cz_colorWithHex:0x20c6c6];
    
    //设置字体颜色
    [self.navigationBar setTitleTextAttributes:@{
                                                 NSForegroundColorAttributeName:[UIColor whiteColor]
                                                 }];
    //设置navigationItem的BarButtonItem
    [self.navigationBar setTintColor:[UIColor whiteColor]];
    
}


/**
 状态栏变亮

 */
- (UIStatusBarStyle)preferredStatusBarStyle{
    
    return UIStatusBarStyleLightContent;
    
}
    
/**
 设置push隐藏tabBar
 */
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    
    if (self.viewControllers.count > 0) {
        
        viewController.hidesBottomBarWhenPushed = YES;
        
    }
    
    [super pushViewController:viewController animated:animated];
}

@end
